{extend name='main'}
{block name="content"}
<div class="think-box-shadow">
    {include file='paper/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='text-left nowrap'>ID</th>
            <th class='text-left nowrap'>试卷</th>
            <th class='text-left nowrap'>学号</th>
            <th class='text-left nowrap'>姓名</th>
            <th class='text-left nowrap'>试题数</th>
            <th class='text-left nowrap'>正确率</th>
            <th class='text-left nowrap'>得分</th>
            <th class='text-left nowrap'>答题时长</th>
            <th class='text-left nowrap'>交卷时间</th>
            <th>操作</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <input class="list-check-box" value='{$vo.id}' type='checkbox'>
            </td>
            <td class="text-left nowrap">
                <span class="font-w7">{$vo.id|default='-'}</span>
            </td>
            <td class='text-left nowrap'>
                <b>{$vo.subject_class_name|default='-'}</b>
            </td>
            <td class='text-left nowrap'>
                {$vo.class_no|default='-'}
            </td>
            <td class='text-left nowrap'>
                {$vo.real_name|default='-'}
            </td>
            <td class='text-left nowrap'>
                {$vo.sub_id|count|default='-'}
            </td>
            <td class='text-left nowrap'>
                {$vo.right_pre|default='0'}%
            </td>
            <td class='text-left nowrap'>
                {$vo.score|default='0'}
            </td>
            <td class='text-left nowrap'>
                {:time_remainder($vo.time)}
            </td>
            <td class='text-left nowrap'>
                {$vo.create_at|format_datetime}
            </td>
            <td class='text-left nowrap'>
                {if auth("edit")}
                <a class="layui-btn layui-btn-sm" data-title="信息" data-open='{:url("edit")}?id={$vo.id}'>详 情</a>
                {/if}
            </td>
            <td class='text-left nowrap'>
                {if auth("remove")}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除 [ {$vo.real_name|default='未知？'} - {$vo.subject_class_name|default='未知？'} ] 的考试记录吗？" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        <tr style="background-color: #dddddd">
            <td></td>
            <td></td>
            <td><span class="font-w7">平均</span></td>
            <td></td>
            <td></td>
            <td></td>
            <td><span class="font-w7">{$avg_right_pre}%</span></td>
            <td><span class="font-w7">{$avg_score}</span></td>
            <td><span class="font-w7">{:time_remainder($avg_time)}</span></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        </tbody>
        {/notempty}
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
